export const schema = {
    type: "page",
    title: "志愿家庭",
    body: {
        type: "crud",
        api: "/api/family",
        primaryField: 'id',
        columnsTogglable: false,
        filter: {
            title: "",
            submitText: "",
            panelClassName: 'm-b-none bg-gd no-border',
            bodyClassName: 'wrapper-sm',
            mode: "inline",
            controls: [
                {
                    type: "text",
                    name: "keyword",
                    placeholder: "户主",
                    style: {minWidth: 260},
                    addOn: {
                        type: "submit",
                        label: "搜索",
                        primary: true
                    }
                },
            ]
        },
        toolbarInline: true,
        bulkActions: [
        ],
        columns: [
            {
                name: "id",
                label: "家庭编号",
                width: 50
            },
            {
                name: "volunteer.real_name",
                label: "户主",
            },
            {
                name: "member_count",
                label: "成员数",
                sortable: true,
                type: "tpl",
                tpl: "<a data-link='/volunteer/list?familyId=${id}'>${member_count}</a>"
            },
            {
                label: "志愿项目",
                name: "join_project_count",
                sortable: true,
            },
            {
                label: "志愿时长",
                name: "service_time_long",
                sortable: true,
            },

        ]
    }
};
